#include <stdio.h>   // <>优先查找系统路径
#include "Student.h" //“”优先从当前路径下查找
#include "Teacher.h"
#include <string.h>
bool IsNameEqual(Stu *s, void *value)
{
    char *name = (char *)value;
    return strcmp(s->name, name) == 0;
}
bool IsAgeEqual(Stu *s, void *value)
{

    return s->age == (int)value;
}
bool IsScoreEqual(Stu *s, void *value)
{
    return s->score >= *(double *)value;
}
int main()
{
    Teach t;
    InitTeacher(&t, "zhangshan", 40, 3);
    printf("%d\n", t.size);
    InsetStu(&t, "lisi", 1, 20, 99);
    InsetStu(&t, "wangwu", 2, 21, 99);
    InsetStu(&t, "zhaoliu", 3, 22, 100);
    double score = 98;
    Stu *s = FindeFirstStu(&t, (void *)&score, IsScoreEqual);
    if (s)
    {
        PrintStu(s);
    }
    else
    {
        printf("meizhaodao\n");
    }

    return 0;
}